<?php
/*由bean脚本生成 powerBy--joe*/
namespace app\common\validate;

use app\common\bean\UserVipBean;

class UserVipValidate extends BaseValidate
{

	static $all = 'all';
	static $add = 'add';
	static $edit = 'edit';
	static $pkId = 'id';

	public function __construct(array $rules = [], array $message = [], array $field = [])
	{
		parent::__construct($rules, $message, $field);
		$this->rule = [
			 UserVipBean::$id => 'require', //
			 UserVipBean::$userId => 'require', //用户id
			 UserVipBean::$vipPrice => 'require', //充值限制金额成为VIP会员
			 UserVipBean::$payPrice => 'require', //充值金额
			 UserVipBean::$vipStartTime => 'require', //vip开始时间
			 UserVipBean::$vipEndTime => 'require', //vip结束时间
			 UserVipBean::$createdAt => 'require', //
		];
		$this->message = [
			UserVipBean::$id.POINST."require " => 'id必须', //
			UserVipBean::$userId.POINST."require " => 'user_id必须', //用户id
			UserVipBean::$vipPrice.POINST."require " => 'vip_price必须', //充值限制金额成为VIP会员
			UserVipBean::$payPrice.POINST."require " => 'pay_price必须', //充值金额
			UserVipBean::$vipStartTime.POINST."require " => 'vip_start_time必须', //vip开始时间
			UserVipBean::$vipEndTime.POINST."require " => 'vip_end_time必须', //vip结束时间
			UserVipBean::$createdAt.POINST."require " => 'created_at必须', //
		];
		$this->scene = [
			self::$all => [
				UserVipBean::$id,
				UserVipBean::$userId,
				UserVipBean::$vipPrice,
				UserVipBean::$payPrice,
				UserVipBean::$vipStartTime,
				UserVipBean::$vipEndTime,
				UserVipBean::$createdAt,
			],
			self::$add => [
			],
			self::$edit => [
			],
			self::$pkId => [],

		];
	}


}
